﻿using System;
using System.ComponentModel;
using DevExpress.Xpo;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    public class TopPromotionDetail : BaseObject
    {
        //begin
        public TopPromotionDetail(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _Id;
        [Size(SizeAttribute.Unlimited)]
        public string Id
        {
            get
            {
                return _Id;
            }
            set
            {
                SetPropertyValue("Id", ref _Id, value);
            }
        }
        private string _PromotionName;
        [Size(SizeAttribute.Unlimited)]
        public string PromotionName
        {
            get
            {
                return _PromotionName;
            }
            set
            {
                SetPropertyValue("PromotionName", ref _PromotionName, value);
            }
        }
        private decimal _DiscountFee;
        public decimal DiscountFee
        {
            get
            {
                return _DiscountFee;
            }
            set
            {
                SetPropertyValue("DiscountFee", ref _DiscountFee, value);
            }
        }
        private string _GiftItemName;
        [Size(SizeAttribute.Unlimited)]
        public string GiftItemName
        {
            get
            {
                return _GiftItemName;
            }
            set
            {
                SetPropertyValue("GiftItemName", ref _GiftItemName, value);
            }
        }
        private TopTrade _Trade;
        [Association("TradePromotionDetails", typeof(TopTrade))]
        public TopTrade Trade
        {
            get
            {
                return _Trade;
            }
            set
            {
                SetPropertyValue("Trade", ref _Trade, value);
            }
        }
        private TopTradeAmount _TradeAmount;
        [Association("TradeAmountPromotionDetails", typeof(TopTradeAmount))]
        public TopTradeAmount TradeAmount
        {
            get
            {
                return _TradeAmount;
            }
            set
            {
                SetPropertyValue("TradeAmount", ref _TradeAmount, value);
            }
        }
        //end


    }
}
